import type { ProfileDetail, ProfileParams } from '@/types/profile'
import { my_request } from '@/utils/http'
// 获取个人信息
export const getMemberProfileAPI = () => {
  return my_request<ProfileDetail>({
    method: 'GET',
    url: '/member/profile',
  })
}

// export const changeMemberAvatarAPI = (data: Avatar) => {
//   return my_request({
//     method: 'POST',
//     url: '/member/profile/avatar',
//     data,
//   })
// }

// 修改个人信息
export const updateMemberProfileAPI = (data: ProfileParams) => {
  return my_request<ProfileDetail>({
    method: 'PUT',
    url: '/member/profile',
    data,
  })
}
